<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="./layui/css/layui.css">
    <style>
        .container {
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .header {
            background: #393D49;
            height: 60px;
            padding: 0 20px;
        }

        .header .logo {
            color: #ffffff;
            font-size: 20px;
            font-weight: bold;
        }

        .content {
            flex: 1;
        }

        .content>.left {
            width: 200px;
            background: #393D49;
        }

        .content>.right {
            flex: 1;
            padding: 10px;
        }

        .pages {
            margin: 0px auto;
        }
        
        .search{
           margin-top: 10px;
        }

        .mask{
            width: 100vw;
            height: 100vh;
            background-color: rgba(0, 0, 0, 0.2);
            position: absolute;
            top:0;
            left:0;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="header flex j-s a-c">
            <div class="logo">LOGO</div>
            <ul class="layui-nav" lay-filter="">
                <li class="layui-nav-item"><a href="">最新活动</a></li>
                <li class="layui-nav-item layui-this"><a href="">产品</a></li>
                <li class="layui-nav-item"><a href="">大数据</a></li>
                <li class="layui-nav-item">
                    <a href="javascript:;" id="loginId">admin</a>
                    <dl class="layui-nav-child">
                        <!-- 二级菜单 -->
                        <dd><a href="javascript:;">我的订单</a></dd>
                        <dd><a href="javascript:;">我的信息</a></dd>
                        <dd><a href="javascript:;" id="exit">退出系统</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
        <div class="content flex">
            <div class="left">
                <ul class="layui-nav layui-nav-tree" lay-filter="test">
                    <!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
                    <li class="layui-nav-item layui-nav-itemed">
                        <a href="javascript:;">学生管理</a>
                        <dl class="layui-nav-child">
                            <dd><a target="right" href="./pages/student/list.html">查询学生</a></dd>
                            <dd><a target="right" href="./pages/student/add.html">添加学生</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">课程管理</a>
                        <dl class="layui-nav-child">
                            <dd><a target="right" href="./pages/subject/list.html">查询课程</a></dd>
                            <dd><a target="right" href="./pages/subject/add.html">添加课程</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">成绩管理</a>
                        <dl class="layui-nav-child">
                            <dd><a target="right" href="./pages/subject/list.html">查询成绩</a></dd>
                            <dd><a target="right" href="./pages/subject/add.html">添加成绩</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item"><a href="">大数据</a></li>
                </ul>
            </div>
            <iframe name="right" class="right" src="./pages/student/list.html">
            </iframe>
        </div>
    </div>
    <script src="./layui/layui.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
    <script>
        //注意：导航 依赖 element 模块，否则无法进行功能性操作
        layui.use(['element', 'laypage','laytpl'], function () {
            var laytpl = layui.laytpl;      //引入模板引擎
            var element = layui.element;    //引入导入模块
            var laypage = layui.laypage;    //引入分页模块

            //显示登录用户的名称
            $("#loginId").text($.cookie('loginId'))

            //退出
            $("#exit").click(function(){
                // $.removeCookie('loginId')    //清除cookie里面的登录用户的名称
                location.href = 'login.html'
            })

        });

    </script>
</body>

</html>